<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>Nordic Thingy:52 v2.2.0 : BH1745 color sensor</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet_offline.css" rel="stylesheet" type="text/css"/>
<link href="nordic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" width="100%" class="blank">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Nordic Semiconductor" src="nordic_small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Nordic Thingy:52 v2.2.0
   </div>
  </td>
 </tr>
 </tbody>
</table>
<script>
var url=window.location.href.split("/").reverse()[1];
var validLinks= ["nrf5","s130","s132","s212","s332"];
var index;
for (index = 0; index < validLinks.length; ++index) {
   if ( url.indexOf(validLinks[index]) !== -1 ) {
      document.getElementById(validLinks[index]).setAttribute('class', 'doclinks docselected');
   };
};
</script>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__bh1745__color.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">BH1745 color sensor<div class="ingroups"><a class="el" href="group__drivers.html">Drivers</a> &raquo; <a class="el" href="group__color__driver.html">Color sensor</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>BH1745 digital color sensor API.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdrv__bh1745__cfg__t.html">drv_bh1745_cfg_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">BH1745 configuration.  <a href="structdrv__bh1745__cfg__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdrv__bh1745__data__t.html">drv_bh1745_data_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Measurement result.  <a href="structdrv__bh1745__data__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdrv__bh1745__threshold__t.html">drv_bh1745_threshold_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Measurement thresholds.  <a href="structdrv__bh1745__threshold__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gabfd0fbafeb40237bdc3653bdb4db70cf"><td class="memItemLeft" align="right" valign="top"><a id="gabfd0fbafeb40237bdc3653bdb4db70cf"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#gabfd0fbafeb40237bdc3653bdb4db70cf">drv_bh1745_gain_t</a> <tr class="memdesc:gabfd0fbafeb40237bdc3653bdb4db70cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">RGBC (red, green, blue, clear) gain setting. <br /></td></tr>
</td></tr>
<tr class="separator:gabfd0fbafeb40237bdc3653bdb4db70cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabe36d490de5a064dba654d29a80c7b3a"><td class="memItemLeft" align="right" valign="top"><a id="gabe36d490de5a064dba654d29a80c7b3a"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#gabe36d490de5a064dba654d29a80c7b3a">drv_bh1745_meas_time_t</a> <tr class="memdesc:gabe36d490de5a064dba654d29a80c7b3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Measurement time. <br /></td></tr>
</td></tr>
<tr class="separator:gabe36d490de5a064dba654d29a80c7b3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga036cd2e4adc00f85f4cdb97ed9ecff1e"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#ga036cd2e4adc00f85f4cdb97ed9ecff1e">drv_bh1745_close</a> (void)</td></tr>
<tr class="memdesc:ga036cd2e4adc00f85f4cdb97ed9ecff1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for closing the BH1745 driver.  <a href="#ga036cd2e4adc00f85f4cdb97ed9ecff1e">More...</a><br /></td></tr>
<tr class="separator:ga036cd2e4adc00f85f4cdb97ed9ecff1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6795dc64922cabf0feafc78a4e168dbb"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#ga6795dc64922cabf0feafc78a4e168dbb">drv_bh1745_data_get</a> (<a class="el" href="structdrv__bh1745__data__t.html">drv_bh1745_data_t</a> *p_data)</td></tr>
<tr class="memdesc:ga6795dc64922cabf0feafc78a4e168dbb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for getting the BH1745 data.  <a href="#ga6795dc64922cabf0feafc78a4e168dbb">More...</a><br /></td></tr>
<tr class="separator:ga6795dc64922cabf0feafc78a4e168dbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga43659c0bf27ebf16ccd9dde8300acc04"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#ga43659c0bf27ebf16ccd9dde8300acc04">drv_bh1745_gain_set</a> (<a class="el" href="group__bh1745__color.html#gabfd0fbafeb40237bdc3653bdb4db70cf">drv_bh1745_gain_t</a> gain)</td></tr>
<tr class="memdesc:ga43659c0bf27ebf16ccd9dde8300acc04"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for setting the BH1745 ADC gain.  <a href="#ga43659c0bf27ebf16ccd9dde8300acc04">More...</a><br /></td></tr>
<tr class="separator:ga43659c0bf27ebf16ccd9dde8300acc04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga76d28dd092160421654e38ac87ebb4b3"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#ga76d28dd092160421654e38ac87ebb4b3">drv_bh1745_init</a> (void)</td></tr>
<tr class="memdesc:ga76d28dd092160421654e38ac87ebb4b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for initializing the BH1745 driver.  <a href="#ga76d28dd092160421654e38ac87ebb4b3">More...</a><br /></td></tr>
<tr class="separator:ga76d28dd092160421654e38ac87ebb4b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1e4f0cf16a33478f6a46560b2e4b159d"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#ga1e4f0cf16a33478f6a46560b2e4b159d">drv_bh1745_int_get</a> (uint8_t *p_int_reg)</td></tr>
<tr class="memdesc:ga1e4f0cf16a33478f6a46560b2e4b159d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for getting the BH1745 interrupt register.  <a href="#ga1e4f0cf16a33478f6a46560b2e4b159d">More...</a><br /></td></tr>
<tr class="separator:ga1e4f0cf16a33478f6a46560b2e4b159d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga61527a1ca099183973142ff928b3412e"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#ga61527a1ca099183973142ff928b3412e">drv_bh1745_int_reset</a> (void)</td></tr>
<tr class="memdesc:ga61527a1ca099183973142ff928b3412e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for resetting the interrupt.  <a href="#ga61527a1ca099183973142ff928b3412e">More...</a><br /></td></tr>
<tr class="separator:ga61527a1ca099183973142ff928b3412e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae392774121ee932b5d3acda0de142657"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#gae392774121ee932b5d3acda0de142657">drv_bh1745_int_set</a> (uint8_t int_reg)</td></tr>
<tr class="memdesc:gae392774121ee932b5d3acda0de142657"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for setting the BH1745 interrupt register.  <a href="#gae392774121ee932b5d3acda0de142657">More...</a><br /></td></tr>
<tr class="separator:gae392774121ee932b5d3acda0de142657"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafda2b23732c3bd1e661d2f0e01598a43"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#gafda2b23732c3bd1e661d2f0e01598a43">drv_bh1745_manu_id_get</a> (uint8_t *p_manu_id)</td></tr>
<tr class="memdesc:gafda2b23732c3bd1e661d2f0e01598a43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for getting the BH1745 manufacturer ID.  <a href="#gafda2b23732c3bd1e661d2f0e01598a43">More...</a><br /></td></tr>
<tr class="separator:gafda2b23732c3bd1e661d2f0e01598a43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga09607c3012886317a9827e0442fe438e"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#ga09607c3012886317a9827e0442fe438e">drv_bh1745_meas_enable</a> (bool enable)</td></tr>
<tr class="memdesc:ga09607c3012886317a9827e0442fe438e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for enabling the BH1745 measurements.  <a href="#ga09607c3012886317a9827e0442fe438e">More...</a><br /></td></tr>
<tr class="separator:ga09607c3012886317a9827e0442fe438e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6513b8f116fe394b20a01aee50cbc99a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#ga6513b8f116fe394b20a01aee50cbc99a">drv_bh1745_meas_time_set</a> (<a class="el" href="group__bh1745__color.html#gabe36d490de5a064dba654d29a80c7b3a">drv_bh1745_meas_time_t</a> meas_time)</td></tr>
<tr class="memdesc:ga6513b8f116fe394b20a01aee50cbc99a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for setting the BH1745 measurement time.  <a href="#ga6513b8f116fe394b20a01aee50cbc99a">More...</a><br /></td></tr>
<tr class="separator:ga6513b8f116fe394b20a01aee50cbc99a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeb0b73a73825ac06e45236517bd54532"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#gaeb0b73a73825ac06e45236517bd54532">drv_bh1745_open</a> (<a class="el" href="structdrv__bh1745__cfg__t.html">drv_bh1745_cfg_t</a> const *const p_cfg)</td></tr>
<tr class="memdesc:gaeb0b73a73825ac06e45236517bd54532"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for opening the BH1745 driver according to the specified configuration.  <a href="#gaeb0b73a73825ac06e45236517bd54532">More...</a><br /></td></tr>
<tr class="separator:gaeb0b73a73825ac06e45236517bd54532"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae40c33fdb63209e8ac4a0ff9fa8e163d"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#gae40c33fdb63209e8ac4a0ff9fa8e163d">drv_bh1745_part_id_get</a> (uint8_t *p_part_id)</td></tr>
<tr class="memdesc:gae40c33fdb63209e8ac4a0ff9fa8e163d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for getting the BH1745 part ID.  <a href="#gae40c33fdb63209e8ac4a0ff9fa8e163d">More...</a><br /></td></tr>
<tr class="separator:gae40c33fdb63209e8ac4a0ff9fa8e163d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga23a22ad13c11a51284c0a6add7048029"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#ga23a22ad13c11a51284c0a6add7048029">drv_bh1745_persistance_get</a> (uint8_t *p_per_reg)</td></tr>
<tr class="memdesc:ga23a22ad13c11a51284c0a6add7048029"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for getting the BH1745 persistance register.  <a href="#ga23a22ad13c11a51284c0a6add7048029">More...</a><br /></td></tr>
<tr class="separator:ga23a22ad13c11a51284c0a6add7048029"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa233270b46cd06bad7ed7a866ff49d0e"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#gaa233270b46cd06bad7ed7a866ff49d0e">drv_bh1745_persistance_set</a> (uint8_t per_reg)</td></tr>
<tr class="memdesc:gaa233270b46cd06bad7ed7a866ff49d0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for setting the BH1745 persistance register.  <a href="#gaa233270b46cd06bad7ed7a866ff49d0e">More...</a><br /></td></tr>
<tr class="separator:gaa233270b46cd06bad7ed7a866ff49d0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1969e372245046c174d54e6a7792a42e"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#ga1969e372245046c174d54e6a7792a42e">drv_bh1745_sw_reset</a> (void)</td></tr>
<tr class="memdesc:ga1969e372245046c174d54e6a7792a42e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for resetting the BH1745 registers.  <a href="#ga1969e372245046c174d54e6a7792a42e">More...</a><br /></td></tr>
<tr class="separator:ga1969e372245046c174d54e6a7792a42e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga429584f9d8ff069549b8569fc35e1a6e"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#ga429584f9d8ff069549b8569fc35e1a6e">drv_bh1745_threshold_get</a> (<a class="el" href="structdrv__bh1745__threshold__t.html">drv_bh1745_threshold_t</a> *p_th)</td></tr>
<tr class="memdesc:ga429584f9d8ff069549b8569fc35e1a6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for getting the BH1745 threshold.  <a href="#ga429584f9d8ff069549b8569fc35e1a6e">More...</a><br /></td></tr>
<tr class="separator:ga429584f9d8ff069549b8569fc35e1a6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabf2ad3592958393a7bf34a9cecbf3a61"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__bh1745__color.html#gabf2ad3592958393a7bf34a9cecbf3a61">drv_bh1745_threshold_set</a> (<a class="el" href="structdrv__bh1745__threshold__t.html">drv_bh1745_threshold_t</a> const *p_th)</td></tr>
<tr class="memdesc:gabf2ad3592958393a7bf34a9cecbf3a61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for setting the BH1745 threshold.  <a href="#gabf2ad3592958393a7bf34a9cecbf3a61">More...</a><br /></td></tr>
<tr class="separator:gabf2ad3592958393a7bf34a9cecbf3a61"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>BH1745 digital color sensor API. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga036cd2e4adc00f85f4cdb97ed9ecff1e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga036cd2e4adc00f85f4cdb97ed9ecff1e">&#9670;&nbsp;</a></span>drv_bh1745_close()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_close </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for closing the BH1745 driver. </p>
<dl class="section return"><dt>Returns</dt><dd>Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="ga6795dc64922cabf0feafc78a4e168dbb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6795dc64922cabf0feafc78a4e168dbb">&#9670;&nbsp;</a></span>drv_bh1745_data_get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_data_get </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdrv__bh1745__data__t.html">drv_bh1745_data_t</a> *&#160;</td>
          <td class="paramname"><em>p_data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for getting the BH1745 data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">p_data</td><td>The measurement results.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
NRF_ERROR_NULL A NULL pointer was supplied. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="ga43659c0bf27ebf16ccd9dde8300acc04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga43659c0bf27ebf16ccd9dde8300acc04">&#9670;&nbsp;</a></span>drv_bh1745_gain_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_gain_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__bh1745__color.html#gabfd0fbafeb40237bdc3653bdb4db70cf">drv_bh1745_gain_t</a>&#160;</td>
          <td class="paramname"><em>gain</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for setting the BH1745 ADC gain. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">gain</td><td>The desired gain value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="ga76d28dd092160421654e38ac87ebb4b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga76d28dd092160421654e38ac87ebb4b3">&#9670;&nbsp;</a></span>drv_bh1745_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for initializing the BH1745 driver. </p>
<dl class="section return"><dt>Returns</dt><dd>NRF_SUCCESS Only possible return value. </dd></dl>

</div>
</div>
<a id="ga1e4f0cf16a33478f6a46560b2e4b159d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1e4f0cf16a33478f6a46560b2e4b159d">&#9670;&nbsp;</a></span>drv_bh1745_int_get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_int_get </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_int_reg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for getting the BH1745 interrupt register. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">p_int_reg</td><td>Contents of the interrupt register.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="ga61527a1ca099183973142ff928b3412e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga61527a1ca099183973142ff928b3412e">&#9670;&nbsp;</a></span>drv_bh1745_int_reset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_int_reset </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for resetting the interrupt. </p>
<dl class="section return"><dt>Returns</dt><dd>NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="gae392774121ee932b5d3acda0de142657"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae392774121ee932b5d3acda0de142657">&#9670;&nbsp;</a></span>drv_bh1745_int_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_int_set </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>int_reg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for setting the BH1745 interrupt register. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">int_reg</td><td>Contents of the interrupt register.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
NRF_ERROR_INVALID_PARAM Invalid register content supplied. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="gafda2b23732c3bd1e661d2f0e01598a43"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafda2b23732c3bd1e661d2f0e01598a43">&#9670;&nbsp;</a></span>drv_bh1745_manu_id_get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_manu_id_get </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_manu_id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for getting the BH1745 manufacturer ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">p_manu_id</td><td>The manufacturer ID.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="ga09607c3012886317a9827e0442fe438e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga09607c3012886317a9827e0442fe438e">&#9670;&nbsp;</a></span>drv_bh1745_meas_enable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_meas_enable </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for enabling the BH1745 measurements. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">enable</td><td>True if measurements are to be enabled.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="ga6513b8f116fe394b20a01aee50cbc99a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6513b8f116fe394b20a01aee50cbc99a">&#9670;&nbsp;</a></span>drv_bh1745_meas_time_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_meas_time_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__bh1745__color.html#gabe36d490de5a064dba654d29a80c7b3a">drv_bh1745_meas_time_t</a>&#160;</td>
          <td class="paramname"><em>meas_time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for setting the BH1745 measurement time. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">meas_time</td><td>The desired measurement time.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="gaeb0b73a73825ac06e45236517bd54532"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaeb0b73a73825ac06e45236517bd54532">&#9670;&nbsp;</a></span>drv_bh1745_open()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_open </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdrv__bh1745__cfg__t.html">drv_bh1745_cfg_t</a> const *const&#160;</td>
          <td class="paramname"><em>p_cfg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for opening the BH1745 driver according to the specified configuration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_cfg</td><td>Pointer to the driver configuration for the session to be opened.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="gae40c33fdb63209e8ac4a0ff9fa8e163d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae40c33fdb63209e8ac4a0ff9fa8e163d">&#9670;&nbsp;</a></span>drv_bh1745_part_id_get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_part_id_get </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_part_id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for getting the BH1745 part ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">p_part_id</td><td>Part ID.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NRF_SUCCESS If the call was successful. </dd>
<dd>
NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="ga23a22ad13c11a51284c0a6add7048029"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga23a22ad13c11a51284c0a6add7048029">&#9670;&nbsp;</a></span>drv_bh1745_persistance_get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_persistance_get </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_per_reg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for getting the BH1745 persistance register. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">p_per_reg</td><td>Contents of the persistance register.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="gaa233270b46cd06bad7ed7a866ff49d0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa233270b46cd06bad7ed7a866ff49d0e">&#9670;&nbsp;</a></span>drv_bh1745_persistance_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_persistance_set </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>per_reg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for setting the BH1745 persistance register. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">per_reg</td><td>Contents of the persistance register.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
NRF_ERROR_INVALID_PARAM Invalid register content supplied. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="ga1969e372245046c174d54e6a7792a42e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1969e372245046c174d54e6a7792a42e">&#9670;&nbsp;</a></span>drv_bh1745_sw_reset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_sw_reset </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for resetting the BH1745 registers. </p>
<dl class="section note"><dt>Note</dt><dd>Will also power down the BH1745.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="ga429584f9d8ff069549b8569fc35e1a6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga429584f9d8ff069549b8569fc35e1a6e">&#9670;&nbsp;</a></span>drv_bh1745_threshold_get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_threshold_get </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdrv__bh1745__threshold__t.html">drv_bh1745_threshold_t</a> *&#160;</td>
          <td class="paramname"><em>p_th</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for getting the BH1745 threshold. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">p_th</td><td>The threshold.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NRF_SUCCESS If the call was successful. </dd>
<dd>
NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
<a id="gabf2ad3592958393a7bf34a9cecbf3a61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabf2ad3592958393a7bf34a9cecbf3a61">&#9670;&nbsp;</a></span>drv_bh1745_threshold_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t drv_bh1745_threshold_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdrv__bh1745__threshold__t.html">drv_bh1745_threshold_t</a> const *&#160;</td>
          <td class="paramname"><em>p_th</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function for setting the BH1745 threshold. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_th</td><td>The threshold.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NRF_SUCCESS If the call was successful. </dd>
<dd>
NRF_ERROR_INVALID_STATE The driver was not open. </dd>
<dd>
Codes from the underlying drivers. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="topicfooter">
<a href="mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback" id="maillink">Documentation feedback</a> | <a href="https://devzone.nordicsemi.com/questions/" target="_blank">Developer Zone</a> | <a href="http://response.nordicsemi.com/subscribe-to-our-newsletters" target="_blank">Subscribe</a> | Updated <span id="date"/>
<script>
var date = new Date("Thu Feb 7 2019" + " UTC");
document.getElementById("date").innerHTML = date.toJSON().slice(0, 10);
var url=window.location.href.split("?")[0];
var filename=url.substring(url.lastIndexOf('/')+1);
document.getElementById("maillink").href = "mailto:docfeedback@nordicsemi.no?subject=Documentation%20feedback"+decodeURIComponent("%26")+"body=File%20name%3A%20"+encodeURIComponent(filename);
</script>
</div>
</body>
</html>
